<template>
    <a href="/ds1"><h1>ds1 seriesLayoutBy</h1></a>
    <a href="/ds2"><h1>ds1 encode修改轴</h1></a>
    <a href="/ds3"><h1>ds1 encode</h1></a>
    <div id="main"></div>
</template>
<script>
import *  as  echarts from 'echarts'


export default {
name: 'dataset',
mounted() {
    let myecharts = document.getElementById('main')
    let myChart = echarts.init(document.getElementById('main'),null,{
        width: 1000,
        height: 600
    })
    let option = {
        legend: {
            // Try 'horizontal'
            orient: 'vertical',
            right: 10,
            top: 'center'
        },
        dataset: {
            dimensions: ['销售时间', '销售金额','销售数量'],
            source: [
                ['2023-07-01', 1200, 100],
                ['2023-07-02', 1200, 200],
                ['2023-07-03', 1100, 100],
                ['2023-07-04', 1300, 300],
                ['2023-07-05', 750, 150],
                ['2023-07-06', 280, 80],
                ['2023-07-07', 300, 200],
                ['2023-07-08', 1100, 100],
                ['2023-07-09', 1300, 300]
            ]   
        },
        xAxis: { type: 'category' },
        yAxis: {},
        series: [{ type: 'line' }, { type: 'line' }]
        };
    myChart.setOption(option)   
}
}
</script>
<style scoped>

</style>